package data;

/**
 *@author Stijn Verslycken, Jonas Van Den Bossche
 *@date 2007-2008 
 * 
 */
public class Village {

    private int villageId;
    private String name;
    private int ownerId;
    private int locationX;
    private int locationY;
    private Resource[] resources = new Resource[5];

    /**
     * Constructor with all parameters
     * @param villageId
     * @param name
     * @param ownerId
     * @param locationX
     * @param locationY
     */
    public Village(int villageId, String name, int ownerId, int locationX, int locationY) {
        setVillageId(villageId);
        setName(name);
        setOwnerId(ownerId);
        setLocationX(locationX);
        setLocationY(locationY);
    }

    /**
     * Constructor with all parameters but villageId.
     * Id wordt default ingesteld op 0
     * @param name
     * @param ownerId
     * @param locationX
     * @param locationY
     */
    public Village(String name, int ownerId, int locationX, int locationY) {
        this(0, name, ownerId, locationX, locationY);
    }

    public int getVillageId() {
        return villageId;
    }

    public void setVillageId(int villageId) {
        this.villageId = villageId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getOwnerId() {
        return ownerId;
    }

    public void setOwnerId(int ownerId) {
        this.ownerId = ownerId;
    }

    public int getLocationX() {
        return locationX;
    }

    public void setLocationX(int locationX) {
        this.locationX = locationX;
    }

    public int getLocationY() {
        return locationY;
    }

    public void setLocationY(int locationY) {
        this.locationY = locationY;
    }

    public void setFoodResource(Resource food) {
        this.resources[0] = food;
    }

    public Resource getFoodResource() {
        return this.resources[0];
    }

    public void setWoodResource(Resource wood) {
        this.resources[1] = wood;
    }

    public Resource getWoodResource() {
        return this.resources[1];
    }

    public void setStoneResource(Resource stone) {
        this.resources[2] = stone;
    }

    public Resource getStoneResource() {
        return this.resources[2];
    }

    public void setIronResource(Resource iron) {
        this.resources[3] = iron;
    }

    public Resource getIronResource() {
        return this.resources[4];
    }

    public void setGoldResource(Resource gold) {
        this.resources[4] = gold;
    }

    public Resource getGoldResource() {
        return this.resources[4];
    }
}
